<template>
  <nav>
    <!-- 顶部导航栏 -->
    <app-topnav />
  </nav>
  <header>
    <!-- 头部导航栏 -->
    <app-header />
    <!-- 头部固定导航栏 -->
    <app-header-sticky />
  </header>
  <main>
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <footer>
    <!-- 底部区域 -->
    <app-footer />
  </footer>
</template>

<script>
import AppTopnav from "@/components/app-topnav.vue";
import AppHeader from "@/components/app-header.vue";
import AppFooter from "@/components/app-footer.vue";
import AppHeaderSticky from "@/components/app-header-sticky.vue";
import { useStore } from "vuex";

export default {
  name: "xtx-layout",
  components: {
    AppTopnav,
    AppHeader,
    AppFooter,
    AppHeaderSticky,
  },
  setup() {
    const store = useStore();
    store.dispatch("category/getList");
  },
};
</script>

<style scoped lang='less'>
</style>